﻿
namespace NLite.Mini.Fluent
{
    /// <summary>
    /// 组件工厂表达式接口
    /// </summary>
    public interface IFactoryExpression : IRegistryExpression
    {
        /// <summary>
        /// 设置组件生命周期类型
        /// </summary>
        /// <param name="lifestyle"></param>
        /// <returns></returns>
        IFactoryExpression Lifestyle(LifestyleFlags lifestyle);

        /// <summary>
        /// 添加组件的一个元数据项
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        IFactoryExpression Add(string key, object value);
    }
}
